package com.aspose.cells;

import java.util.Iterator;

public class LegendEntryCollection extends CollectionBase {
   private Chart b;

   LegendEntryCollection(Chart chart) {
      this.b = chart;
   }

   public LegendEntry get(int index) {
      LegendEntry var2 = this.a(index);
      if (var2 == null) {
         var2 = new LegendEntry(this.b.getLegend(), index);
         com.aspose.cells.b.a.a.ze.a(this.a, (Object)var2);
      }

      return var2;
   }

   LegendEntry a(int var1) {
      Iterator var2 = this.a.iterator();

      LegendEntry var3;
      do {
         if (!var2.hasNext()) {
            return null;
         }

         var3 = (LegendEntry)var2.next();
      } while(var3.c() != var1);

      return var3;
   }

   LegendEntry b(int var1) {
      return (LegendEntry)this.a.get(var1);
   }

   void a(LegendEntryCollection var1) {
      this.a.clear();

      for(int var2 = 0; var2 < var1.a.size(); ++var2) {
         LegendEntry var3 = (LegendEntry)var1.a.get(var2);
         LegendEntry var4 = new LegendEntry(this.b.getLegend(), var3.c());
         var4.a(var3);
         com.aspose.cells.b.a.a.ze.a(this.a, (Object)var4);
      }

   }
}
